<%-- 
    Document   : incHeader
    Created on : Oct 17, 2012, 9:21:57 AM
    Author     : DinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<div id="header">
    <div id="Banner">
        <a href="#"><img src="/MantechHelpdesk/images/logo.png" />        
        </a>

    </div>        
    <h:form style="margin:0px; padding:0px;">
        <div id="TopMenu">
            <t:panelTab rendered="#{login.role == 1}">
                <ul>
                    <li><span><h:outputText value="Hi #{login.username}"/></span></li>
                    <li><a href="/MantechHelpdesk/faces/index.jsp">Home</a></li>
                    <li><a href="/MantechHelpdesk/faces/depart/departmentsList.jsp">Departments</a></li>
                    <li><a href="/MantechHelpdesk/faces/threads/threadList.jsp">Threads</a></li>
                    <li><a href="/MantechHelpdesk/faces/articles/articlesList.jsp">Articles</a></li>
                    <li><a href="/MantechHelpdesk/faces/complaints/complaintsList.jsp">Complaint View</a></li>
                    <li><a href="/MantechHelpdesk/faces/users/userList.jsp">Create User</a></li>
                    <li>
                        <h:commandLink value="Change Pass" action="#{usersBean.prepareData4ChangePass}">
                            <f:param name="idParam" value="#{login.userid}"/>
                        </h:commandLink>
                    </li>
                    <li>
                        <h:commandLink value="Logout" action="#{login.logout}" />                
                    </li>            
                </ul>     
            </t:panelTab>      

            <t:panelTab rendered="#{login.role == 2}">
                <ul>
                    <li><span><h:outputText value="Hi #{login.username}"/></span></li>
                    <li><a href="/MantechHelpdesk/faces/index.jsp">Home</a></li>
                    <li><a href="/MantechHelpdesk/faces/complaints/complaintsList.jsp">Complaint View</a></li>
                    <li>
                        <h:commandLink value="Change Pass" action="#{usersBean.prepareData4ChangePass}">
                            <f:param name="idParam" value="#{login.userid}"/>
                        </h:commandLink>
                    </li>
                    <li>
                        <h:commandLink value="Logout" action="#{login.logout}" />                
                    </li>            
                </ul>     
            </t:panelTab>      

            <t:panelTab rendered="#{login.role == 3}">
                <ul>
                    <li><span><h:outputText value="Hi #{login.username}"/></span></li>
                    <li><a href="/MantechHelpdesk/faces/index.jsp">Home</a></li>
                    <li><a href="/MantechHelpdesk/faces/complaints/complaintsList.jsp">Complaint View</a></li>
                    <li>
                        <h:commandLink value="Change Pass" action="#{usersBean.prepareData4ChangePass}">
                            <f:param name="idParam" value="#{login.userid}"/>
                        </h:commandLink>
                    </li>
                    <li>
                        <h:commandLink value="Logout" action="#{login.logout}" />                
                    </li>            
                </ul>     
            </t:panelTab>      
            <t:panelTab rendered="#{login.role == 0}">
                <ul>
                    <li><a href="/MantechHelpdesk/faces/index.jsp">Home</a></li>
                    <li><a href="/MantechHelpdesk/faces/login.jsp">Login</a></li>   
                </ul>    
            </t:panelTab>
        </div></h:form>
</div>
